import * as types from '../mutation-types'

// initial state
const state = {
  tableInfo: {}
}

// getters
const getters = {
  getTableInfo: state => state.tableInfo
}

// actions
const actions = {
  relatedTableInfo ({commit}, relatedTable) {
    commit(types.RELATED_TABLE_INFO, relatedTable)
  }
}

// mutations
const mutations = {
  [types.RELATED_TABLE_INFO] (state, tableInfo) {
    state.tableInfo = tableInfo
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
